﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true" CodeBehind="ListOrigin.aspx.cs" Inherits="SES.CMS.AdminCP.ListOrigin" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <asp:Panel ID="pnView" runat="server">
        <h2>
            Danh sách Nhãn hiệu</h2>
        <div style="float: left; width: 100%; ">
            <asp:GridView ID="gvAt" DataKeyNames="OriginID" runat="server" AutoGenerateColumns="False"
                OnRowDeleting="gvAt_RowDeleting" PageSize="50" CssClass="tstyle2" Width="100%"
                PagerStyle-CssClass="pgr" AllowPaging="true" 
                OnPageIndexChanging="gvAt_PageIndexChanging" onrowdatabound="gvAt_RowDataBound" 
                onselectedindexchanged="gvAt_SelectedIndexChanged1">
                <Columns>
                    <asp:BoundField DataField="STT" HeaderText="STT" ReadOnly="True" SortExpression="STT"
                        Visible="false" />
                    <asp:BoundField DataField="Origin" HeaderText="Nhãn hiệu" SortExpression="Origin" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Center" />
                    <asp:BoundField DataField="Description" HeaderText="Mô tả" SortExpression="Description"
                        ItemStyle-Width="30%" />
                    <asp:TemplateField ItemStyle-Width="13%" HeaderText="Thao tác" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                            <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("OriginID") %>'
                                CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <br />
            <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Thêm mới" />
        </div>
    </asp:Panel>
      <asp:Panel ID="pnInsert" runat="server">
        <h2>
            Thêm mới xuất sứ
        </h2>
        <table class="tablet">
            <tr>
                <td class="style8" style="width: 150px;">
                    Tên nhãn hiệu:
                </td>
                <td class="style9" colspan="3">
                    <asp:TextBox ID="txtName" runat="server" Width="350px" ValidationGroup="submitGrp"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                        ErrorMessage="*** Cần nhập tiêu đề" ValidationGroup="submitGrp"></asp:RequiredFieldValidator>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style8">
                    Mô tả:
                </td>
                <td colspan="3">
                <CKEditor:CKEditorControl ID="txtDescription" runat="server"></CKEditor:CKEditorControl>
                    <%--<telerik:RadEditor ID="txtDescription" runat="server" OnClientPasteHtml="OnClientPasteHtml"
                        DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd" Width="100%" Font-Size="13px">
                        <ImageManager MaxUploadFileSize="1024000000" ViewMode="Grid" DeletePaths="~/images/"
                            UploadPaths="~/images/" ViewPaths="~/images/"></ImageManager>
                    </telerik:RadEditor>--%>
                </td>
            </tr>
            <tr>
                <td class="style8">
                    &nbsp;
                </td>
                <td class="style4" colspan="3">
                    <asp:Button ID="btnSave" runat="server" Text="Lưu" OnClick="btnSave_Click" ValidationGroup="submitGrp" />
                    <asp:Button ID="btnReset" runat="server" Text="Hủy" OnClick="btnReset_Click" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
